From: Florian Müllner Date: Sat, 26 Feb 2022 17:35:47 +0000 (+0100) Subject: dash: Fix drag placeholder position in RTL X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~516^2^2~31 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4735193456e525edada2bbc5ab11b609e4eabd81;p=gnome-shell.git dash: Fix drag placeholder position in RTL The position corresponds to a child index, which means it must be mirrored when starting to count from the right. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4574 Part-of: --- diff --git a/js/ui/dash.js b/js/ui/dash.js index e5f81fca7..24d3a8907 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -883,10 +883,12 @@ var Dash = GObject.registerClass({ } let pos; - if (!this._emptyDropTarget) - pos = Math.floor(x * numChildren / boxWidth); + if (this._emptyDropTarget) + pos = 0; // always insert at the start when dash is empty + else if (this.text_direction === Clutter.TextDirection.RTL) + pos = numChildren - Math.floor(x * numChildren / boxWidth); else - pos = 0; // always insert at the top when dash is empty + pos = Math.floor(x * numChildren / boxWidth); // Put the placeholder after the last favorite if we are not // in the favorites zone